package com.bug.event.test;

import java.util.concurrent.atomic.AtomicInteger;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class DemoListener implements ApplicationListener<DemoEvent> {

  @Autowired
  private IDemoProxy demoProxy;

  private AtomicInteger counter = new AtomicInteger();

  @DemoAopAnnotation
  @Override
  public void onApplicationEvent(DemoEvent event) {
    System.err.println("onApplicationEvent counter:" + counter.incrementAndGet());
  }

}
